A disk array apparatus incorporates a cache as a high-speed device (a disk cache memory) to thereby reduce access time to data. For example, when the disk array apparatus receives a write request for data from a host computer, the disk array apparatus once stores the data in the cache, and notifies the host computer of a completion of a processing. In other words, the disk array apparatus makes a data processing time look short for the host computer by performing a processing for writing the data in the cache rather than in a disk or a magnetic disk (“write processing in a write-back state”). The data which is written in the cache and is not written in the disk is called “dirty data”. The dirty data is written in the disk after the disk array apparatus notifies the host computer of the completion of the processing.
In a dirty data processing method, a dirty data processing apparatus, and a dirty data processing program, it is proposed to monitor battery remaining power of a storage device, to control an allowed amount of dirty data in a cache memory included in the storage device according to the battery remaining power, to perform write-through operation when the allowed amount of the dirty data is equal to or smaller than a threshold, and to perform write-back operation when the allowed amount of the dirty data is larger than the threshold.
In a battery management system chip having a function of flexibly expanding a control rule, it is proposed to externally attach a nonvolatile memory, in which an application program for battery management is stored, to a battery management chip, in which a central processing unit (CPU), a ROM and ROM_RAM decoder, and an SRAM are built-in, to write data stored in the nonvolatile memory into the SRAM at the time of power-on or reset of a main body, and to write data stored in the SRAM back to the nonvolatile memory thereby the data is stored in the nonvolatile memory again before the main body is shut down.    Patent Document 1: Japanese Laid-Open Patent Publication No. 2006-313407    Patent Document 2: Japanese Laid-Open Patent Publication No. 2008-204935.
The dirty data, which is written in the cache memory, is not written in the disk, which is a nonvolatile storage device, yet at that point. When an electric power failure of a main power supply or the like occurs and a power supply to the cache memory is stopped before a write processing of the dirty data in the disk is performed, the dirty data is lost. Therefore, it is necessary to protect the dirty data stored in the cache memory.
For the protection of the dirty data, a backup processing for the dirty data is executed. For example, a method is adopted which supplies electric power to the cache memory from a backup power supply, and stores data for several tens hours, when the electric power failure of the main power supply occurs. Alternatively, a method is adopted which causes only a part of the disk array apparatus to operate and forcibly writes the dirty data into the disk array apparatus, which is a nonvolatile device.
However, an allowed amount of the dirty data is an amount of the dirty data which can be actually protected by the backup power supply at that point. The power supply capacity of the backup power supply gradually falls because of, for example, aged deterioration, a charging state, and the like. On the other hand, a threshold of the allowed amount of the dirty data is fixed. Therefore, when the power supply capacity of the backup power supply falls to be equal to or lower than the threshold, the disk array apparatus is forcibly shifted from a write-back state at that time to a write-through state.
Because of this shift, when the disk array apparatus receives a write request of data from the host computer, the disk array apparatus can notify a completion of a write processing only after the disk array apparatus writes the data into a disk. Therefore, data processing time becomes long. In addition, the disk array apparatus operates in the write-through state until the power supply capacity of the backup power supply increases to be larger than the threshold. Therefore, a period in which the data processing time is long continues for a long time.